﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Net;

namespace Sinacor.Infra.Service.Security.Authorization
{
    /// <summary>
    /// Classe para armazenar os Resources de Funções
    /// </summary>
    public sealed class UserIdentity
    {
        private Int32 _userId;
        private string _loginName;
        private string _password;
        private string _tokenId;
        private int _companyId;
        private string _clientHost;

        /// <summary>
        /// Construtor Padrão
        /// </summary>
        public UserIdentity()
        {

        }

        /// <summary>
        /// Variação do Construtor
        /// </summary>
        /// <param name="userId">Id do usuário</param>
        /// <param name="loginName">Login do usuário</param>
        /// <param name="companyId">Id da empresa</param>
        /// <param name="IP">IP do usuário</param>
        public UserIdentity(int userId, string loginName, string password, string tokenId, int companyId, string clientHost)
        {
            _userId = userId;
            _loginName = loginName;
            _password = password;
            _tokenId = tokenId;
            _companyId = companyId;
            _clientHost = clientHost;
        }
        
        /// <summary>
        /// Login do usuário
        /// </summary>
        public string LoginName 
        {
            get { return this._loginName; }
            set { this._loginName = value; } 
        }

        /// <summary>
        /// Password cifrado do usuário
        /// </summary>
        public string Password
        {
            get { return this._password; }
            set { this._password = value; }
        }

        /// <summary>
        /// Id do Token
        /// </summary>
        public string TokenId
        {
            get { return _tokenId; }
            set { _tokenId = value; }
        }

        /// <summary>
        /// Id do usuário
        /// </summary>
        public Int32 UserId 
        {
            get { return this._userId; }
            set { this._userId = value; } 
        }

        /// <summary>
        /// Id da empresa
        /// </summary>
        public Int32 CompanyId
        {
            get { return this._companyId; }
            set { this._companyId = value; }
        }

        /// <summary>
        /// IP do usuário
        /// </summary>
        public string ClientHost
        {
            get { return this._clientHost; }
            set { this._clientHost = value; }
        }
    }

}
